# coding=utf-8
import urllib2,urllib,time
from bs4 import BeautifulSoup


url="http://www.dydao.top/%s.html"


def main():
    for i in range(7670,7671,1):
        parse_url(url%(i))



def parse_url(url):
    print url
    try:
        html=urllib2.urlopen(url).read()
        a=BeautifulSoup(html,"html.parser")
        for info in a.select('.entry-content img[src]'):
            print info['src']
            #urllib.urlretrieve(info['src'],'C://WORKSPACE//logs//'+str(long(int(round(time.time() * 1000))))+".jpg")
    except urllib2.HTTPError,e:
        print e.code
        print e.reason












if __name__ == '__main__':
    main()
